Repository navigation
fix(server): match the standing compaction policy on the 200k window - #146
Conversation
The thread type policy now carries separate Claude and Codex context windows, floors the Claude compaction percent so a standing thread lands at 164988, caps the carried summary at the table's token count, and reads a title tag in either case. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Note 🤖 grok/grok-4.7 responding on behalf of nullStack65 Independent review of the standing compaction alignment (the thread type policy follow-up, CLO-924), read at The usage threshold looked like it recomputed the compaction percent against the wrong window. Checked against the canonical table in the config pull request (https://github.com/nullStack65/closura-agent-config/pull/957, head
Verification: {
"reviewed_head": "36e63e329a12a0e327689127febb26b79d5090ef",
"reviewer": "grok/grok-4.7",
"findings": [
{
"id": "usage-threshold-window",
"severity": "important",
"summary": "The reported auto-compact threshold recomputes the percent against a window larger than the Claude policy window.",
"outcome": "dismissed",
"rechecked_head": "36e63e329a12a0e327689127febb26b79d5090ef"
}
]
} |
Problem
The merged thread type policy (pull request 114, the per-thread-type model, cache and compaction policy, CLO-924) reads one shared context window and rounds the Claude compaction percent up. The standing policy table has since moved: Claude runs at 200k, Codex stays at 272k, standing compaction must land at or below 165000, the carried summary is capped at 8000 tokens, and a title tag such as
[Standing]must still count as standing.Change
The policy file now carries a window per harness and an optional per-type summary cap. Claude's percent is floored against the effective window (the context minus the 20k output reserve) and then clamped by the 13k headroom, so a standing thread at 165000 lands at 164988 and a 168000 row lands at 166986 instead of Claude's default. A standing thread's carried summary is bounded by the cap at one token per two characters, through Claude's appended prompt and Codex's
compact_prompt. Title tags match in either case.Scope
Follow-up to the thread type policy issue (CLO-924), aligning the fork with the updated table in the config pull request (https://github.com/nullStack65/closura-agent-config/pull/957, head
7b761d7c).Deploy: none
Verification
ThreadTypePolicy,RuntimePolicy, and the thread-type cases ofClaudeAdapterV2andCodexAdapterV2: 26 passed.vp run --filter t3 --filter @t3tools/provider-core typecheck: both passed. Pre-existing schema-brand suggestions only.ERR_UNKNOWN_FILE_EXTENSION), and knip reports the same metro.mtserror plus unused mobile files that this change does not touch. The commit was made with hooks disabled for that reason.Not checked: GitHub CI on this head.
Model: grok/grok-4.7, harness: Claude Code on the R720.
🤖 Generated with Claude Code